<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>"> 
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!-- 屏幕自适应 -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- bootstrap -->
	<link rel="stylesheet" href="shop/public/assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="shop/public/css/custom.css">
    <link rel="stylesheet" href="shop/public/css/shopCart.css"/>
	<!-- 标题 -->
	<title>桌边零食-随时随地，想购就购~(～￣▽￣)～</title>
  </head>
  
  <body onload="isDisplayUser('<%=request.getSession().getAttribute("username") %>')">
    <div class="head-top">
    		<!--导航栏开始-->
			<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
				<div class="container-fluid">
					<!--导航头部(logo)-->
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"> 
		                	<span class="icon-bar"></span>
		                    <span class="icon-bar"></span>
		                    <span class="icon-bar"></span> 
	                    </button> 
	                    <a style="color:#f22e00" class="navbar-brand" href="<%=basePath%>index.jsp" ><i>桌边零食</i></a>
					</div>
					<!--导航列表-->
					<div id="navbar-collapse"  >
						<ul class="nav navbar-nav">
							<li class="active">
								<a class="head-a" href="<%=basePath%>index.jsp">首页 <span class="sr-only">(current)</span></a>
							</li>
							<!--用户订单记录(重要) 支付和未支付的-->
							<li class="dropdown">
								<a href="#" class="dropdown-toggle head-a" data-toggle="dropdown" role="button"><span style="color:#f22e00" class="glyphicon glyphicon-inbox"></span> 我的桌边 <span class="caret"></span></a>
								<ul class="dropdown-menu" role="menu">
									<li><a href="#">已买到的零食</a></li><!--已支付已接收的订单-->
									<li class="divider"></li>

									<!--
										<li><a href="Setting!showSettionInfo.action">我的足迹</a></li> 
									-->

									<li><a href="#">最近购物</a></li> 

								</ul>
							</li>
							<!--购物车-->
							<li><a class="head-a" href="cartList?userid=<%=request.getSession().getAttribute("userid") %>&&page=1" ><span style="color:#f22e00" class="glyphicon glyphicon-shopping-cart"></span> 
							购物车 <span id="cartNum" ><%=request.getSession().getAttribute("cartNum") %></span></a>
							</li>
							<!--收藏夹-->
							<li><a class="head-a" href="showTheFav?userid=<%=request.getSession().getAttribute("userid") %>"  role="button" aria-expanded="true"><span style="color:#f22e00" class="glyphicon glyphicon-star"></span> 收藏夹 </a>
							</li>
							<li class="dropdown"><a class="head-a" href="#" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true"><span style="color:#f22e00" class="glyphicon glyphicon-th-list"></span> 网站导航 <span class="caret"></span></a>
								<ul class="dropdown-menu" role="menu">
									<li role="presentation" class="dropdown-header">休闲零食</li>
						            <li><a href="pageAction!showProductsPage.action?categoryName=坚果炒货&pageIndex=1">坚果炒货</a></li>
						            <li><a href="pageAction!showProductsPage.action?categoryName=梅/果干&pageIndex=1">梅/果干</a></li>
						            <li><a href="pageAction!showProductsPage.action?categoryName=糖果巧克力&pageIndex=1">糖果巧克力</a></li>
						            <li class="divider"></li>
						            <li role="presentation" class="dropdown-header">饼干糕点</li>
						            <!--自定义的菜单样式submenu-->
						            <li class="dropdown-submenu">
						            	<a href="#"  class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true">传统糕点  </a>
						            	<ul class="dropdown-menu" role="menu">
						            		<li><a href="pageAction!showProductsPage.action?categoryName=麻薯&pageIndex=1">麻薯</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=凤梨酥&pageIndex=1">凤梨酥</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=黄山烧饼&pageIndex=1">黄山烧饼</a></li>
						            	</ul>

						            </li>
						            <li class="dropdown-submenu">
						            	<a href="#"  class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true">西式糕点</a>
						            	<ul class="dropdown-menu" role="menu">
						            		<li><a href="pageAction!showProductsPage.action?categoryName=华夫饼&pageIndex=1">华夫饼</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=铜锣烧&pageIndex=1">铜锣烧</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=牛乳蛋糕&pageIndex=1">牛乳蛋糕</a></li>
						            	</ul> 
						            </li>
						            <li class="divider"></li>
						            <li role="presentation" class="dropdown-header">茶水饮料</li>
						            <li class="dropdown-submenu">
						            	<a href="#"  class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true">红茶</a>
						            	<ul class="dropdown-menu" role="menu">
						            		<li><a href="pageAction!showProductsPage.action?categoryName=正山小种&pageIndex=1">正山小种</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=祁门红茶&pageIndex=1">祁门红茶</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=川红&pageIndex=1">川红</a></li>
						            	</ul> 
						            </li>
						            <li class="dropdown-submenu">
						            	<a href="#"  class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true">饮料</a>
						            	<ul class="dropdown-menu" role="menu">
						            		<li><a href="pageAction!showProductsPage.action?categoryName=碳酸饮料&pageIndex=1">碳酸饮料</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=即饮咖啡&pageIndex=1">即饮咖啡</a></li>
								            <li><a href="pageAction!showProductsPage.action?categoryName=果味饮料&pageIndex=1">果味饮料</a></li>
						            	</ul> 
						            </li>
						        </ul>
							</li>
						</ul> 
						<!--右边导航栏-->
						<ul class="nav navbar-nav navbar-right">
						
							<!--搜索零食-->
							<form class="navbar-form navbar-left" role="search" action="search">
								<div class="input-group">
									<input type="text" name="search" class="form-control" placeholder="零食传送门....">
									<span class="input-group-btn">
										<button class="btn btn-default" type="sumbit">
											<span style="color:#f22e00" class="glyphicon glyphicon-search"></span> 
											走起！
										</button>
									</span>
								</div>
							</form>
							
							<!--登录后修改为用户名-->
							<li><a class="head-a" id="userLogin" href="shop/Login.jsp"  style="color:#f22e00;display:display;">亲,请先登录!</a></li>
							<li class="dropdown">
								<a id="user" name="user.username" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" style="color:#f22e00;display:none;">
									<span><img/></span> 
									<%=request.getSession().getAttribute("username") %> 
									<span class="caret"></span>
								</a>
								<ul class="dropdown-menu" role="menu"> 
									<li><a href="shop/Setting.jsp">个人中心</a></li><!-- 用户设置 -->
									<li class="divider"></li>
									<li><a href="quit">退出</a></li><!--用户退出，清除cookie-->
								</ul>
							</li>
						</ul>
					</div>
				</div>
			</nav>
			<!--导航栏结束-->
 			
			<!--幻灯片展示-->
			<div id="adCarousel" class="carousel slide" data-ride="carousel">
				<!--小圆点-->
				<ol class="carousel-indicators">
					<li data-target="#adCarousel" data-slide-to="0" class="active"></li>
					<li data-target="#adCarousel" data-slide-to="1"></li>
					<li data-target="#adCarousel" data-slide-to="2"></li>
				</ol>
				<!--图片加文字-->
				<div class="carousel-inner" role="listbox">
					<div class="item active">
						<!--图片超链接到商品区-->
						<img src="shop/public/img/main1.jpg" alt="1">
						<div  class="carousel-caption">
							<h3>Ready-P 笑脸糖</h3>
							<p>这种香味绵长持久 Ready-P 笑脸糖5包/10包包邮<br/>
								<a href="pageAction!showProductInfoAction.action?productId=45" class="btn btn-default detail">查看详情</a>
							</p> 
						</div>
						
					</div>
					<div class="item">
						 <img src="shop/public/img/main2.jpg" alt="2"> 
						<div  class="carousel-caption">
							<h3>五宝牛奶水果巧克力糖果63g</h3>
							<p>日本进口小孩儿童疯抢零食<br/>
								<a href="pageAction!showProductInfoAction.action?productId=46" class="btn btn-default detail">查看详情</a>
							</p>
						</div>
					</div>
					<div class="item">
						 <img src="shop/public/img/main3.jpg" alt="3"> 
						<div  class="carousel-caption">
							<h3>上海特产食品冠生园大白兔花生牛轧糖散称250g</h3>
							<p>经典休闲零食糖果<br/>
								<a href="pageAction!showProductInfoAction.action?productId=47" class="btn btn-default detail">查看详情</a>
							</p>
						</div>
					</div>
				</div>
				<!--前进后退-->
				<a class="left carousel-control" href="#adCarousel" role="button" data-slide="prev">
					<span class="glyphicon glyphicon-chevron-left"  ></span>
					<span class="sr-only">Previous</span>
				</a>
				<a class="right carousel-control" href="#adCarousel" role="button" data-slide="next">
					<span class="glyphicon glyphicon-chevron-right"  ></span>
					<span class="sr-only">Next</span>
				</a>
			</div>
			<!--幻灯片结束-->
		
			<!-- 首页商品推荐 -->
		    <div class="row">
		    
		   	  <!-- 左边展示 -->
			  <div class="col-sm-6 col-md-4" >
			    <div class="thumbnail">
			      <img class="cusFoods" src="shop/public/img/foods/1.jpg" alt="特价猪油糖">
			      <div class="caption">
				        <h3>特价猪油糖</h3>
				        <p>原汁原味、来自XXX农村</p> 
				        <div class="cusDes">
				        	<span>￥10</span> 
				        	<span class="cusDes2">￥60</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="48" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,48);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,48);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=48" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/2.jpg" alt="土红糖农家手工原糖2斤">
			      <div class="caption">
				        <h3>土红糖农家手工原糖2斤</h3>
				        <p>只做原生态红糖甘蔗糖</p>
				        <div class="cusDes">
				        	<span>￥25.00</span>
				        	<span class="cusDes2">¥44.90</span>
				        </div> 
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="49" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,49);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,49);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=49" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/3.jpg" alt="内蒙手撕牛肉干500g">
			      <div class="caption">
				        <h3>内蒙手撕牛肉干500g</h3>
				        <p>烤制牛肉干</p>
				        <div class="cusDes">
				        	<span>￥95.00</span>
				        	<span class="cusDes2">¥219.00</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="50" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,50);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,50);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=50" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			  </div>
			  
			  <!-- 中间展示 --> 
			  <div class="col-sm-6 col-md-4">
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/4.jpg" alt="内蒙特级金莲花茶240朵">
			      <div class="caption">
				        <h3>内蒙特级金莲花茶240朵</h3>
				        <p>润肺黄芩茶</p>
				        <div class="cusDes">
				        	<span>￥35.00</span>
				        	<span class="cusDes2">¥70.00</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="51" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,51);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,51);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=51" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/5.jpg" alt="世权花生酥糖果零食点心">
			      <div class="caption">
				        <h3>世权花生酥糖果零食点心</h3>
				        <p>营养丰富</p>
				        <div class="cusDes">
				        	<span>￥19.80</span>
				        	<span class="cusDes2">¥36.80</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="52" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,52);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,52);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=52" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/6.jpg" alt="正宗建宁农家自产白莲子">
			      <div class="caption">
				        <h3>正宗建宁农家自产白莲子</h3>
				        <p>2件</p>
				        <div class="cusDes">
				        	<span>￥44.50</span>
				        	<span class="cusDes2">¥70.00</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="53" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,53);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,53);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=53" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			  </div>
			  <!-- 右边展示 -->
			  <div class="col-sm-6 col-md-4" style="width:455px;">
			    <div class="thumbnail">
			      <img style="height:300px;" src="shop/public/img/foods/7.jpg" alt="吕梁野生沙棘汁350ml">
			      <div class="caption">
				        <h3>吕梁野生沙棘汁350ml</h3>
				        <p>野生沙棘汁</p>
				        <div class="cusDes">
				        	<span>￥40.77</span>
				        	<span class="cusDes2">¥59.80</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="54" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,54);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,54);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=54" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/8.jpg" alt="品酷爆浆牛轧饼150g">
			      <div class="caption">
				        <h3>品酷爆浆牛轧饼150g</h3>
				        <p>浓郁奶香</p>
				        <div class="cusDes">
				        	<span>￥12.40</span>
				        	<span class="cusDes2">¥29.80</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="55" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,55);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,55);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=55" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			    <div class="thumbnail">
			      <img src="shop/public/img/foods/9.jpg" alt="一朵一杯大菊花夏清热降火">
			      <div class="caption">
				        <h3>一朵一杯大菊花夏清热降火</h3>
				        <p>精美礼盒装</p>
				        <div class="cusDes">
				        	<span>￥44.90</span>
				        	<span class="cusDes2">¥190.00</span>
				        </div>
				        <p>
				        	<input type="hidden" name="user.userid" value="<%=request.getSession().getAttribute("userid")%>" style="display:none;"/>
				        	<input type="hidden" name="shopProduct.productid" value="56" style="display:none;"/>
				        	<input type="button" class="btn detail2" value="添加到购物车" onclick="addToCart(<%=request.getSession().getAttribute("userid")%>,56);"/>
				        	<input type="button" class="btn detail2" value="添加到收藏夹" onclick="addToFav(<%=request.getSession().getAttribute("userid")%>,56);"/>
				        	<a href="pageAction!showProductInfoAction.action?productId=56" class="btn btn-default  detail3" role="button">商品详细</a>
				        </p>
			      </div>
			    </div>
			    
			  </div>
			</div>
			<hr/>
			<!-- 首页商品推荐结束 -->
			
			 

		</div>
		<!-- Javascript -->
        <script src="shop/public/assets/js/jquery-1.11.1.min.js"></script>
        <script src="shop/public/assets/bootstrap/js/bootstrap.min.js"></script> 
        <script src="shop/public/assets/js/retina-1.1.0.min.js"></script>
        <!--修改背景-->
        <script src="shop/public/assets/js/scripts.js"></script>
        <script src="shop/public/assets/js/jquery.backstretch.min.js"></script>
        <!-- 控制出现/消失 -->
        <script src="shop/public/assets/js/user.js"></script>
        <!-- 购物车 -->
        <script src="shop/public/assets/js/cart.js"></script>
        <!-- Cookies -->
        <script scr="shop/public/assets/js/jquery.cookie.js"></script>
        <!--[if lt IE 10]>
            <script src="shop/public/assets/js/placeholder.js"></script>
        <![endif]-->
  </body>
</html>
